home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Complementary Applications 2004 February / SGI IRIX 6.5 Complementary Applications 2004 February.iso / dist / OpenOffice.idb / usr / OpenOffice / help / en / scalc.jar / text / scalc / 01 / 04060112.xml < prev    next >
Encoding:
Extensible Markup Language  |  2002-01-24  |  39.3 KB  |  471 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <html><head><title>Add-in for Programming in %PRODUCTNAME Calc</title><meta name="filename" content="text/scalc/01/04060112"/><meta name="language" content="en-US"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css">
  3.  
  4.         table.Tabelle2{
  5.                 }
  6.         span.Tabelle2A{
  7.                 width:1.499cm;}
  8.         span.Tabelle2B{
  9.                 width:16.498cm;}
  10.         tr.Tabelle21{
  11.                 }
  12.         td.Tabelle2A1{
  13.                 }
  14.         table.Tabelle1{
  15.                 margin-left:0cm; margin-right:0.005cm;}
  16.         span.Tabelle1A{
  17.                 width:3.598cm;}
  18.         span.Tabelle1B{
  19.                 width:14.39cm;}
  20.         td.Tabelle1A1{
  21.                 }
  22.         td.Tabelle1B1{
  23.                 border-width:0.002cm; border-style:solid; border-color:#000000;}
  24.         td.Tabelle1A2{
  25.                 }
  26.         td.Tabelle1B2{
  27.                 }
  28.         table.Tabelle3{
  29.                 }
  30.         span.Tabelle3A{
  31.                 width:2.037cm;}
  32.         span.Tabelle3B{
  33.                 width:2.39cm;}
  34.         span.Tabelle3C{
  35.                 width:13.573cm;}
  36.         td.Tabelle3A1{
  37.                 }
  38.         td.Tabelle3C1{
  39.                 border-width:0.002cm; border-style:solid; border-color:#000000;}
  40.         td.Tabelle3A2{
  41.                 }
  42.         td.Tabelle3B2{
  43.                 }
  44.         td.Tabelle3C2{
  45.                 }
  46.         table.Tabelle4{
  47.                 }
  48.         span.Tabelle4A{
  49.                 width:2.039cm;}
  50.         span.Tabelle4B{
  51.                 width:2.39cm;}
  52.         span.Tabelle4C{
  53.                 width:13.571cm;}
  54.         td.Tabelle4A1{
  55.                 }
  56.         td.Tabelle4C1{
  57.                 border-width:0.002cm; border-style:solid; border-color:#000000;}
  58.         td.Tabelle4A2{
  59.                 }
  60.         td.Tabelle4B2{
  61.                 }
  62.         td.Tabelle4C2{
  63.                 }
  64.         table.Tabelle5{
  65.                 }
  66.         span.Tabelle5A{
  67.                 width:2.039cm;}
  68.         span.Tabelle5B{
  69.                 width:2.39cm;}
  70.         span.Tabelle5C{
  71.                 width:13.571cm;}
  72.         td.Tabelle5A1{
  73.                 }
  74.         td.Tabelle5C1{
  75.                 border-width:0.002cm; border-style:solid; border-color:#000000;}
  76.         td.Tabelle5A2{
  77.                 }
  78.         td.Tabelle5B2{
  79.                 }
  80.         td.Tabelle5C2{
  81.                 }
  82.         p.P1{
  83.                 }
  84.         p.P2{
  85.                 }
  86.         span.T1{
  87.                 font-weight:bold;}
  88.         span.fr1{
  89.                 }
  90.         </style></head><body>
  91.   
  92.   
  93.   <p class="P1"/>
  94.   <p class="Head1"><help:switch select="System" xmlns:help="http://openoffice.org/2000/help"><help:case select="UNIX"><help:key-word value="programming a shared library for %PRODUCTNAME Calc" tag="kw66914_1"/></help:case><help:default><help:key-word value="programming external DLL functions for %PRODUCTNAME Calc" tag="kw66914_8"/></help:default></help:switch><help:switch select="System" xmlns:help="http://openoffice.org/2000/help"><help:case select="UNIX"><help:key-word value="shared library for programming in %PRODUCTNAME Calc" tag="kw66914_7"/></help:case><help:default><help:key-word value="external DLL functions for programming in %PRODUCTNAME Calc" tag="kw66914_6"/></help:default></help:switch><help:switch select="System" xmlns:help="http://openoffice.org/2000/help"><help:case select="UNIX"><help:key-word value="functions of the shared library for %PRODUCTNAME Calc" tag="kw66914_5"/></help:case><help:default><help:key-word value="functions of the %PRODUCTNAME Calc add-in DLL" tag="kw66914_4"/></help:default></help:switch><help:key-word value="add-in category" tag="kw66914_3" xmlns:help="http://openoffice.org/2000/help"/><help:key-word value="add-in for programming in %PRODUCTNAME Calc" tag="kw66914_2" xmlns:help="http://openoffice.org/2000/help"/>Add-in for Programming in <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Calc</p>
  95.   <p class="Paragraph">An Add-In can be attached to <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Calc, which is an external programming module providing additional functions for working with spreadsheets. These are displayed in the Function AutoPilot in the <span class="T1">Add-In</span> category. If you would like to program such an Add-In yourself, you can learn here which functions must be exported by the <help:switch select="System" xmlns:help="http://openoffice.org/2000/help"><help:case select="UNIX">Shared Library</help:case><help:default>external DLL</help:default></help:switch> so that the Add-In can be successfully attached.</p>
  96.   <p class="Paragraph"><help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> searches the path defined in <span class="T1">Tools - Options - <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> - Path</span> for modules according to a subordinate "addin" and examines these against a suitable <help:switch select="System" xmlns:help="http://openoffice.org/2000/help"><help:case select="UNIX">Shared library</help:case><help:default>DLL</help:default></help:switch>. In order for this <help:switch select="System" xmlns:help="http://openoffice.org/2000/help"><help:case select="UNIX"/><help:default>DLL</help:default></help:switch> to be recognized by <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname>, it must have certain properties, as explained in the following. This information allows you to program your own AddIn for AutoPilot: Functions of <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Calc.</p>
  97.   <table><tr class="Tabelle21"><th class="Tabelle2A1" style="text-align:left;"><span class="Tabelle2A">
  98.       <p class="Paragraph"><draw:image draw:style-name="fr1" draw:name="HIND_1" text:anchor-type="paragraph" svg:width="0.847cm" svg:height="0.847cm" draw:z-index="0" xlink:href="65980" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" draw:filter-name="GIF - Graphics Interchange" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:text="http://openoffice.org/2000/text" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"/></p>
  99.      </span></th><th class="Tabelle2A1" style="text-align:left;"><span class="Tabelle2B">
  100.       <p class="Paragraph">Included in the program package are two samples of an Add-In interface of <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Calc. If you indicated during installation of the program that Add-Ins are also to be installed, an "addin" directory is included in the Office directory, which contains sample DLLs as well as an additional "source" subdirectory listing the source code.</p>
  101.       <p class="Paragraph">A description of the add-in functions provided by the sample DLLs can be found in the <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Help about the Function AutoPilot in the <help:link Id="66872" Eid="beispiele" xmlns:help="http://openoffice.org/2000/help">add-in category</help:link>.</p>
  102.      </span></th></tr></table>
  103.   <p class="Paragraph"/>
  104.   <p class="Head2">The Add-In Concept</p>
  105.   <p class="Paragraph">Each Add-In library provides several functions. Some functions are used for management purposes and must follow a certain convention. Through these functions information about other functions is available, which make up the extension of <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Calc. You can choose any name for these functions. However, they must also follow certain rules regarding parameter passing. The exact naming and calling conventions vary for different platforms. Under Windows, the Pascal conventions are used, among others, because Pascal is still widely common.</p>
  106.   <p class="Head3">Functions of <help:switch select="System" xmlns:help="http://openoffice.org/2000/help"><help:case select="UNIX">Shared Library</help:case><help:default>AddIn DLL</help:default></help:switch></p>
  107.   <p class="Paragraph">At a minimum, the management functions <help:link Id="66914" Eid="getfunctioncount" xmlns:help="http://openoffice.org/2000/help">GetFunctionCount</help:link> and <help:link Id="66914" Eid="getfunctiondata" xmlns:help="http://openoffice.org/2000/help">GetFunctionData</help:link> must exist. Using these, the functions as well as parameter types and return values can be determined. For return values, the Double and String types are supported. For additional parameters, the cell areas <help:link Id="66914" Eid="doublearray" xmlns:help="http://openoffice.org/2000/help">Double Array</help:link>, <help:link Id="66914" Eid="stringarray" xmlns:help="http://openoffice.org/2000/help">String Array</help:link>, and <help:link Id="66914" Eid="cellarray" xmlns:help="http://openoffice.org/2000/help">Cell Array</help:link> are supported.</p>
  108.   <p class="Paragraph">Parameters are passed using references. Therefore, a change of these values is basically possible. However, this is not supported in <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Calc because it does not make sense within spreadsheets.</p>
  109.   <p class="Paragraph">Libraries can be reloaded during load time and their contents can be analyzed using the two management functions. For each function, information about parameter number and type, application internal and real names as well as management numbers is available.</p>
  110.   <p class="Paragraph">The functions are called synchronously and return their results immediately. Real time functions (asynchronous functions) are also possible; however, they are not explained in detail because of their complexity.</p>
  111.   <p class="Head2">General information about the interface</p>
  112.   <p class="Paragraph">The maximum number of parameters in an Add-In function attached to <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Calc is 16: one result value and a maximum of 15 input function parameters.</p>
  113.   <p class="Paragraph">The data types are defined as follows:</p>
  114.   <table border="1" bordercolor="#000000" cellpadding="2" cellspacing="0" page-break-inside="page-break-inside:avoid"><tr class=""><th class="Tabelle1A1" style="text-align:left;"><span class="Tabelle1A">
  115.       <p class="P2">Data types</p>
  116.      </span></th><th class="Tabelle1B1" style="text-align:left;"><span class="Tabelle1B">
  117.       <p class="P2">Definition</p>
  118.      </span></th></tr><tr class=""><td class="Tabelle1A2" style="text-align:left;"><span class="Tabelle1A">
  119.      <p class="Paragraph">CALLTYPE</p>
  120.     </span></td><td class="Tabelle1B2" style="text-align:left;"><span class="Tabelle1B">
  121.      <p class="Paragraph">Under Windows: FAR PASCAL (_far _pascal)</p>
  122.      <p class="Paragraph">other: default (operating system specific default)</p>
  123.     </span></td></tr><tr class=""><td class="Tabelle1A2" style="text-align:left;"><span class="Tabelle1A">
  124.      <p class="Paragraph">USHORT</p>
  125.     </span></td><td class="Tabelle1B2" style="text-align:left;"><span class="Tabelle1B">
  126.      <p class="Paragraph">2 Byte unsigned Integer</p>
  127.     </span></td></tr><tr class=""><td class="Tabelle1A2" style="text-align:left;"><span class="Tabelle1A">
  128.      <p class="Paragraph">double</p>
  129.     </span></td><td class="Tabelle1B2" style="text-align:left;"><span class="Tabelle1B">
  130.      <p class="Paragraph">8 byte platform-dependent format</p>
  131.     </span></td></tr><tr class=""><td class="Tabelle1A2" style="text-align:left;"><span class="Tabelle1A">
  132.      <p class="Paragraph">Paramtype</p>
  133.     </span></td><td class="Tabelle1B2" style="text-align:left;"><span class="Tabelle1B">
  134.      <p class="Paragraph">platform-dependent like int</p>
  135.      <p class="Paragraph">PTR_DOUBLE =0 pointer to a double</p>
  136.      <p class="Paragraph">PTR_STRING =1 pointer to a zero-terminated string</p>
  137.      <p class="Paragraph">PTR_DOUBLE_ARR =2 pointer to a double array</p>
  138.      <p class="Paragraph">PTR_STRING_ARR =3 pointer to a string array</p>
  139.      <p class="Paragraph">PTR_CELL_ARR =4 pointer to a cell array</p>
  140.      <p class="Paragraph">NONE =5</p>
  141.     </span></td></tr></table>
  142.   <p class="Paragraph"/>
  143.   <p class="Head2"><help:switch select="System" xmlns:help="http://openoffice.org/2000/help"><help:case select="UNIX">Shared Library</help:case><help:default>DLL</help:default></help:switch> functions</p>
  144.   <p class="Paragraph">Following you will find a description of those functions, which are called at the <help:switch select="System" xmlns:help="http://openoffice.org/2000/help"><help:case select="UNIX">Shared Library</help:case><help:default>external DLL</help:default></help:switch>.</p>
  145.   <p class="Paragraph">For all <help:switch select="System" xmlns:help="http://openoffice.org/2000/help"><help:case select="UNIX">Shared Library</help:case><help:default>DLL</help:default></help:switch> functions applies:</p>
  146.   <p class="Paragraph">void CALLTYPE fn(out, in1, in2, ...)</p>
  147.   <p class="Paragraph">Output: Resulting value</p>
  148.   <p class="Paragraph">Input: Any number of types (double&, char*, double*, char**, Cel area), where the <help:link Id="66914" Eid="zellbereich" xmlns:help="http://openoffice.org/2000/help">Cell area</help:link> is an array of types double array, string array, or cell array.</p>
  149.   <p class="Head3"><a name="getfunctioncount"/>GetFunctionCount()</p>
  150.   <p class="Paragraph">Returns the number of functions without the management functions of the reference parameter. Each function has a unique number between 0 and nCount-1. This number will be needed for the <help:link Id="66914" Eid="getfunctiondata" xmlns:help="http://openoffice.org/2000/help">GetFunctionData</help:link> and <help:link Id="66914" Eid="getparameterdescription" xmlns:help="http://openoffice.org/2000/help">GetParameterDescription</help:link> functions later.</p>
  151.   <p class="P2">Syntax</p>
  152.   <p class="Paragraph">void CALLTYPE GetFunctionCount(USHORT& nCount)</p>
  153.   <p class="P2">Parameter</p>
  154.   <p class="Paragraph">USHORT &nCount:</p>
  155.   <p class="Paragraph">Output: Reference to a variable, which is supposed to contain the number of Add-In functions. E.g.: If the Add-In provides 5 functions for <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Calc, then nCount=5.</p>
  156.   <p class="Head3"><a name="getfunctiondata"/>GetFunctionData()</p>
  157.   <p class="Paragraph">Determines all the important information about an AddIn function.</p>
  158.   <p class="P2">Syntax</p>
  159.   <p class="Paragraph">void CALLTYPE GetFunctionData(USHORT& nNo, char* pFuncName, USHORT& nParamCount, Paramtype* peType, char* pInternalName)</p>
  160.   <p class="P2">Parameter</p>
  161.   <p class="Paragraph">USHORT& nNo:</p>
  162.   <p class="Paragraph">Input: Function number between 0 and nCount-1, inclusively.</p>
  163.   <p class="Paragraph">char* pFuncName:</p>
  164.   <p class="Paragraph">Output: Function name as seen by the programmer, as it is named in the <help:switch select="System" xmlns:help="http://openoffice.org/2000/help"><help:case select="UNIX">Shared Library</help:case><help:default>DLL</help:default></help:switch>. This name does not determine the name used in the function AutoPilot.</p>
  165.   <p class="Paragraph">USHORT& nParamCount:</p>
  166.   <p class="Paragraph">Output: Number of parameters in AddIn function. This number must be greater than 0, because there is always a result value; the maximum value is 16.</p>
  167.   <p class="Paragraph">Paramtype* peType:</p>
  168.   <p class="Paragraph">Output: Pointer to an array of exactly 16 variables of type Paramtype. The first nParamCount entries are filled with the suitable type of parameter.</p>
  169.   <p class="Paragraph">char* pInternalName:</p>
  170.   <p class="Paragraph">Output: Function name as seen by the user, as it appears in the Function AutoPilot. May contain umlauts.</p>
  171.   <p class="Paragraph">The pFuncName and pInternalName parameters are char arrays, which are implemented with size 256 in <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Calc.</p>
  172.   <p class="Head3"><a name="getparameterdescription"/>GetParameterDescription()</p>
  173.   <p class="Paragraph">Provides a brief description of the AddIn function and its parameters. As an option, this function can be used to show a function and parameter description in the function AutoPilot.</p>
  174.   <p class="P2">Syntax</p>
  175.   <p class="Paragraph">void CALLTYPE GetParameterDescription(USHORT& nNo, USHORT& nParam, char* pName, char* pDesc)</p>
  176.   <p class="P2">Parameter</p>
  177.   <p class="Paragraph">USHORT& nNo:</p>
  178.   <p class="Paragraph">Input: Number of the function in the library; between 0 and nCount-1.</p>
  179.   <p class="Paragraph">USHORT& nParam:</p>
  180.   <p class="Paragraph">Input: Indicates, for which parameter the description is provided; parameters start at 1. If nParam is 0, the description itself is supposed to be provided in pDesc; in this case, pName does not have any meaning.</p>
  181.   <p class="Paragraph">char* pName:</p>
  182.   <p class="Paragraph">Output: Takes up the parameter name or type, e.g. the word "Number" or "String" or "Date", etc. Implemented in <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Calc as char[256].</p>
  183.   <p class="Paragraph">char* pDesc:</p>
  184.   <p class="Paragraph">Output: Takes up the description of the parameter, e.g. "Value, at which the universe is to be calculated." Implemented in <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Calc as char[256].</p>
  185.   <p class="Paragraph">pName and pDesc are char arrays; implemented in <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Calc with size 256. Please note that the space available in the Function AutoPilot is limited and that the 256 characters cannot be fully used.</p>
  186.   <p class="Head2"><a name="zellbereich"/>Cell areas</p>
  187.   <p class="Paragraph">The following tables contain information about which data structures must be provided by an external program module in order to pass cell areas. <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Calc distinguishes between three different arrays, depending on the data type.</p>
  188.   <p class="Head3"><a name="doublearray"/>Double Array</p>
  189.   <p class="Paragraph">As a parameter, a cell area with values of the Number/Double type can be passed. A double array in <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Calc is defined as follows:</p>
  190.   <table border="1" bordercolor="#000000" cellpadding="2" cellspacing="0" page-break-inside="page-break-inside:avoid"><tr class=""><th class="Tabelle3A1" style="text-align:left;"><span class="Tabelle3A">
  191.       <p class="P2">Offset</p>
  192.      </span></th><th class="Tabelle3A1" style="text-align:left;"><span class="Tabelle3B">
  193.       <p class="P2">Name</p>
  194.      </span></th><th class="Tabelle3C1" style="text-align:left;"><span class="Tabelle3C">
  195.       <p class="P2">Description</p>
  196.      </span></th></tr><tr class=""><td class="Tabelle3A2" style="text-align:left;"><span class="Tabelle3A">
  197.      <p class="Paragraph">0</p>
  198.     </span></td><td class="Tabelle3B2" style="text-align:left;"><span class="Tabelle3B">
  199.      <p class="Paragraph">Col1</p>
  200.     </span></td><td class="Tabelle3C2" style="text-align:left;"><span class="Tabelle3C">
  201.      <p class="Paragraph">Column number in the upper-left corner of the cell area. Numbering starts at 0.</p>
  202.     </span></td></tr><tr class=""><td class="Tabelle3A2" style="text-align:left;"><span class="Tabelle3A">
  203.      <p class="Paragraph">2</p>
  204.     </span></td><td class="Tabelle3B2" style="text-align:left;"><span class="Tabelle3B">
  205.      <p class="Paragraph">Row1</p>
  206.     </span></td><td class="Tabelle3C2" style="text-align:left;"><span class="Tabelle3C">
  207.      <p class="Paragraph">Row number in the upper-left corner of the cell area; numbering starts at 0.</p>
  208.     </span></td></tr><tr class=""><td class="Tabelle3A2" style="text-align:left;"><span class="Tabelle3A">
  209.      <p class="Paragraph">4</p>
  210.     </span></td><td class="Tabelle3B2" style="text-align:left;"><span class="Tabelle3B">
  211.      <p class="Paragraph">Tab1</p>
  212.     </span></td><td class="Tabelle3C2" style="text-align:left;"><span class="Tabelle3C">
  213.      <p class="Paragraph">Table number in the upper-left corner of the cell area; numbering starts at 0.</p>
  214.     </span></td></tr><tr class=""><td class="Tabelle3A2" style="text-align:left;"><span class="Tabelle3A">
  215.      <p class="Paragraph">6</p>
  216.     </span></td><td class="Tabelle3B2" style="text-align:left;"><span class="Tabelle3B">
  217.      <p class="Paragraph">Col2</p>
  218.     </span></td><td class="Tabelle3C2" style="text-align:left;"><span class="Tabelle3C">
  219.      <p class="Paragraph">Column number in the lower-right corner of the cell area. Numbering starts at 0.</p>
  220.     </span></td></tr><tr class=""><td class="Tabelle3A2" style="text-align:left;"><span class="Tabelle3A">
  221.      <p class="Paragraph">8</p>
  222.     </span></td><td class="Tabelle3B2" style="text-align:left;"><span class="Tabelle3B">
  223.      <p class="Paragraph">Row2</p>
  224.     </span></td><td class="Tabelle3C2" style="text-align:left;"><span class="Tabelle3C">
  225.      <p class="Paragraph">Row number in the lower-right corner of the cell area; numbering starts at 0.</p>
  226.     </span></td></tr><tr class=""><td class="Tabelle3A2" style="text-align:left;"><span class="Tabelle3A">
  227.      <p class="Paragraph">10</p>
  228.     </span></td><td class="Tabelle3B2" style="text-align:left;"><span class="Tabelle3B">
  229.      <p class="Paragraph">Tab2</p>
  230.     </span></td><td class="Tabelle3C2" style="text-align:left;"><span class="Tabelle3C">
  231.      <p class="Paragraph">Table number in the lower-right corner of the cell area; numbering starts at 0.</p>
  232.     </span></td></tr><tr class=""><td class="Tabelle3A2" style="text-align:left;"><span class="Tabelle3A">
  233.      <p class="Paragraph">12</p>
  234.     </span></td><td class="Tabelle3B2" style="text-align:left;"><span class="Tabelle3B">
  235.      <p class="Paragraph">Count</p>
  236.     </span></td><td class="Tabelle3C2" style="text-align:left;"><span class="Tabelle3C">
  237.      <p class="Paragraph">Number of the following elements. Empty cells are not counted or passed.</p>
  238.     </span></td></tr><tr class=""><td class="Tabelle3A2" style="text-align:left;"><span class="Tabelle3A">
  239.      <p class="Paragraph">14</p>
  240.     </span></td><td class="Tabelle3B2" style="text-align:left;"><span class="Tabelle3B">
  241.      <p class="Paragraph">Col</p>
  242.     </span></td><td class="Tabelle3C2" style="text-align:left;"><span class="Tabelle3C">
  243.      <p class="Paragraph">Column number of the element. Numbering starts at 0.</p>
  244.     </span></td></tr><tr class=""><td class="Tabelle3A2" style="text-align:left;"><span class="Tabelle3A">
  245.      <p class="Paragraph">16</p>
  246.     </span></td><td class="Tabelle3B2" style="text-align:left;"><span class="Tabelle3B">
  247.      <p class="Paragraph">Row</p>
  248.     </span></td><td class="Tabelle3C2" style="text-align:left;"><span class="Tabelle3C">
  249.      <p class="Paragraph">Row number of the element; numbering starts at 0.</p>
  250.     </span></td></tr><tr class=""><td class="Tabelle3A2" style="text-align:left;"><span class="Tabelle3A">
  251.      <p class="Paragraph">18</p>
  252.     </span></td><td class="Tabelle3B2" style="text-align:left;"><span class="Tabelle3B">
  253.      <p class="Paragraph">Tab</p>
  254.     </span></td><td class="Tabelle3C2" style="text-align:left;"><span class="Tabelle3C">
  255.      <p class="Paragraph">Table number of the element; numbering starts at 0.</p>
  256.     </span></td></tr><tr class=""><td class="Tabelle3A2" style="text-align:left;"><span class="Tabelle3A">
  257.      <p class="Paragraph">20</p>
  258.     </span></td><td class="Tabelle3B2" style="text-align:left;"><span class="Tabelle3B">
  259.      <p class="Paragraph">Error</p>
  260.     </span></td><td class="Tabelle3C2" style="text-align:left;"><span class="Tabelle3C">
  261.      <p class="Paragraph">Error number, where the value 0 is defined as "no error." If the element comes from a formula cell the error value is determined by the formula.</p>
  262.     </span></td></tr><tr class=""><td class="Tabelle3A2" style="text-align:left;"><span class="Tabelle3A">
  263.      <p class="Paragraph">22</p>
  264.     </span></td><td class="Tabelle3B2" style="text-align:left;"><span class="Tabelle3B">
  265.      <p class="Paragraph">Value</p>
  266.     </span></td><td class="Tabelle3C2" style="text-align:left;"><span class="Tabelle3C">
  267.      <p class="Paragraph">8 byte IEEE variable of type double/floating point</p>
  268.     </span></td></tr><tr class=""><td class="Tabelle3A2" style="text-align:left;"><span class="Tabelle3A">
  269.      <p class="Paragraph">30</p>
  270.     </span></td><td class="Tabelle3B2" style="text-align:left;"><span class="Tabelle3B">
  271.      <p class="Paragraph">...</p>
  272.     </span></td><td class="Tabelle3C2" style="text-align:left;"><span class="Tabelle3C">
  273.      <p class="Paragraph">Next element</p>
  274.     </span></td></tr></table>
  275.   <p class="Paragraph"/>
  276.   <p class="Head3"><a name="stringarray"/>String Array</p>
  277.   <p class="Paragraph">A cell area, which contains values of data type Text and is passed as a string array. A string array in <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Calc is defined as follows:</p>
  278.   <table border="1" bordercolor="#000000" cellpadding="2" cellspacing="0" page-break-inside="page-break-inside:avoid"><tr class=""><th class="Tabelle4A1" style="text-align:left;"><span class="Tabelle4A">
  279.       <p class="P2">Offset</p>
  280.      </span></th><th class="Tabelle4A1" style="text-align:left;"><span class="Tabelle4B">
  281.       <p class="P2">Name</p>
  282.      </span></th><th class="Tabelle4C1" style="text-align:left;"><span class="Tabelle4C">
  283.       <p class="P2">Description</p>
  284.      </span></th></tr><tr class=""><td class="Tabelle4A2" style="text-align:left;"><span class="Tabelle4A">
  285.      <p class="Paragraph">0</p>
  286.     </span></td><td class="Tabelle4B2" style="text-align:left;"><span class="Tabelle4B">
  287.      <p class="Paragraph">Col1</p>
  288.     </span></td><td class="Tabelle4C2" style="text-align:left;"><span class="Tabelle4C">
  289.      <p class="Paragraph">Column number in the upper-left corner of the cell area. Numbering starts at 0.</p>
  290.     </span></td></tr><tr class=""><td class="Tabelle4A2" style="text-align:left;"><span class="Tabelle4A">
  291.      <p class="Paragraph">2</p>
  292.     </span></td><td class="Tabelle4B2" style="text-align:left;"><span class="Tabelle4B">
  293.      <p class="Paragraph">Row1</p>
  294.     </span></td><td class="Tabelle4C2" style="text-align:left;"><span class="Tabelle4C">
  295.      <p class="Paragraph">Row number in the upper-left corner of the cell area; numbering starts at 0.</p>
  296.     </span></td></tr><tr class=""><td class="Tabelle4A2" style="text-align:left;"><span class="Tabelle4A">
  297.      <p class="Paragraph">4</p>
  298.     </span></td><td class="Tabelle4B2" style="text-align:left;"><span class="Tabelle4B">
  299.      <p class="Paragraph">Tab1</p>
  300.     </span></td><td class="Tabelle4C2" style="text-align:left;"><span class="Tabelle4C">
  301.      <p class="Paragraph">Table number in the upper-left corner of the cell area; numbering starts at 0.</p>
  302.     </span></td></tr><tr class=""><td class="Tabelle4A2" style="text-align:left;"><span class="Tabelle4A">
  303.      <p class="Paragraph">6</p>
  304.     </span></td><td class="Tabelle4B2" style="text-align:left;"><span class="Tabelle4B">
  305.      <p class="Paragraph">Col2</p>
  306.     </span></td><td class="Tabelle4C2" style="text-align:left;"><span class="Tabelle4C">
  307.      <p class="Paragraph">Column number in the lower-right corner of the cell area. Numbering starts at 0.</p>
  308.     </span></td></tr><tr class=""><td class="Tabelle4A2" style="text-align:left;"><span class="Tabelle4A">
  309.      <p class="Paragraph">8</p>
  310.     </span></td><td class="Tabelle4B2" style="text-align:left;"><span class="Tabelle4B">
  311.      <p class="Paragraph">Row2</p>
  312.     </span></td><td class="Tabelle4C2" style="text-align:left;"><span class="Tabelle4C">
  313.      <p class="Paragraph">Row number in the lower-right corner of the cell area; numbering starts at 0.</p>
  314.     </span></td></tr><tr class=""><td class="Tabelle4A2" style="text-align:left;"><span class="Tabelle4A">
  315.      <p class="Paragraph">10</p>
  316.     </span></td><td class="Tabelle4B2" style="text-align:left;"><span class="Tabelle4B">
  317.      <p class="Paragraph">Tab2</p>
  318.     </span></td><td class="Tabelle4C2" style="text-align:left;"><span class="Tabelle4C">
  319.      <p class="Paragraph">Table number in the lower-right corner of the cell area; numbering starts at 0.</p>
  320.     </span></td></tr><tr class=""><td class="Tabelle4A2" style="text-align:left;"><span class="Tabelle4A">
  321.      <p class="Paragraph">12</p>
  322.     </span></td><td class="Tabelle4B2" style="text-align:left;"><span class="Tabelle4B">
  323.      <p class="Paragraph">Count</p>
  324.     </span></td><td class="Tabelle4C2" style="text-align:left;"><span class="Tabelle4C">
  325.      <p class="Paragraph">Number of the following elements. Empty cells are not counted or passed.</p>
  326.     </span></td></tr><tr class=""><td class="Tabelle4A2" style="text-align:left;"><span class="Tabelle4A">
  327.      <p class="Paragraph">14</p>
  328.     </span></td><td class="Tabelle4B2" style="text-align:left;"><span class="Tabelle4B">
  329.      <p class="Paragraph">Col</p>
  330.     </span></td><td class="Tabelle4C2" style="text-align:left;"><span class="Tabelle4C">
  331.      <p class="Paragraph">Column number of the element. Numbering starts at 0.</p>
  332.     </span></td></tr><tr class=""><td class="Tabelle4A2" style="text-align:left;"><span class="Tabelle4A">
  333.      <p class="Paragraph">16</p>
  334.     </span></td><td class="Tabelle4B2" style="text-align:left;"><span class="Tabelle4B">
  335.      <p class="Paragraph">Row</p>
  336.     </span></td><td class="Tabelle4C2" style="text-align:left;"><span class="Tabelle4C">
  337.      <p class="Paragraph">Row number of the element; numbering starts at 0.</p>
  338.     </span></td></tr><tr class=""><td class="Tabelle4A2" style="text-align:left;"><span class="Tabelle4A">
  339.      <p class="Paragraph">18</p>
  340.     </span></td><td class="Tabelle4B2" style="text-align:left;"><span class="Tabelle4B">
  341.      <p class="Paragraph">Tab</p>
  342.     </span></td><td class="Tabelle4C2" style="text-align:left;"><span class="Tabelle4C">
  343.      <p class="Paragraph">Table number of the element; numbering starts at 0.</p>
  344.     </span></td></tr><tr class=""><td class="Tabelle4A2" style="text-align:left;"><span class="Tabelle4A">
  345.      <p class="Paragraph">20</p>
  346.     </span></td><td class="Tabelle4B2" style="text-align:left;"><span class="Tabelle4B">
  347.      <p class="Paragraph">Error</p>
  348.     </span></td><td class="Tabelle4C2" style="text-align:left;"><span class="Tabelle4C">
  349.      <p class="Paragraph">Error number, where the value 0 is defined as "no error." If the element comes from a formula cell the error value is determined by the formula.</p>
  350.     </span></td></tr><tr class=""><td class="Tabelle4A2" style="text-align:left;"><span class="Tabelle4A">
  351.      <p class="Paragraph">22</p>
  352.     </span></td><td class="Tabelle4B2" style="text-align:left;"><span class="Tabelle4B">
  353.      <p class="Paragraph">Len</p>
  354.     </span></td><td class="Tabelle4C2" style="text-align:left;"><span class="Tabelle4C">
  355.      <p class="Paragraph">Length of the following string, including closing zero byte. If the length including closing zero byte equals an odd value a second zero byte is added to the string so that an even value is achieved. Therefore, Len is calculated using ((StrLen+2)&~1).</p>
  356.     </span></td></tr><tr class=""><td class="Tabelle4A2" style="text-align:left;"><span class="Tabelle4A">
  357.      <p class="Paragraph">24</p>
  358.     </span></td><td class="Tabelle4B2" style="text-align:left;"><span class="Tabelle4B">
  359.      <p class="Paragraph">String</p>
  360.     </span></td><td class="Tabelle4C2" style="text-align:left;"><span class="Tabelle4C">
  361.      <p class="Paragraph">String with closing zero byte</p>
  362.     </span></td></tr><tr class=""><td class="Tabelle4B2" style="text-align:left;"><span class="Tabelle4A">
  363.      <p class="Paragraph">24+Len</p>
  364.     </span></td><td class="Tabelle4B2" style="text-align:left;"><span class="Tabelle4B">
  365.      <p class="Paragraph">...</p>
  366.     </span></td><td class="Tabelle4C2" style="text-align:left;"><span class="Tabelle4C">
  367.      <p class="Paragraph">Next element</p>
  368.     </span></td></tr></table>
  369.   <p class="Paragraph"/>
  370.   <p class="Head3"><a name="cellarray"/>Cell Array</p>
  371.   <p class="Paragraph">Cel arrays are used to call cell areas containing text as well as numbers. A cell array in <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Calc is defined as follows:</p>
  372.   <table border="1" bordercolor="#000000" cellpadding="2" cellspacing="0" page-break-inside="page-break-inside:avoid"><tr class=""><th class="Tabelle5A1" style="text-align:left;"><span class="Tabelle5A">
  373.       <p class="P2">Offset</p>
  374.      </span></th><th class="Tabelle5A1" style="text-align:left;"><span class="Tabelle5B">
  375.       <p class="P2">Name</p>
  376.      </span></th><th class="Tabelle5C1" style="text-align:left;"><span class="Tabelle5C">
  377.       <p class="P2">Description</p>
  378.      </span></th></tr><tr class=""><td class="Tabelle5A2" style="text-align:left;"><span class="Tabelle5A">
  379.      <p class="Paragraph">0</p>
  380.     </span></td><td class="Tabelle5B2" style="text-align:left;"><span class="Tabelle5B">
  381.      <p class="Paragraph">Col1</p>
  382.     </span></td><td class="Tabelle5C2" style="text-align:left;"><span class="Tabelle5C">
  383.      <p class="Paragraph">Column number in the upper-left corner of the cell area. Numbering starts at 0.</p>
  384.     </span></td></tr><tr class=""><td class="Tabelle5A2" style="text-align:left;"><span class="Tabelle5A">
  385.      <p class="Paragraph">2</p>
  386.     </span></td><td class="Tabelle5B2" style="text-align:left;"><span class="Tabelle5B">
  387.      <p class="Paragraph">Row1</p>
  388.     </span></td><td class="Tabelle5C2" style="text-align:left;"><span class="Tabelle5C">
  389.      <p class="Paragraph">Row number in the upper-left corner of the cell area; numbering starts at 0.</p>
  390.     </span></td></tr><tr class=""><td class="Tabelle5A2" style="text-align:left;"><span class="Tabelle5A">
  391.      <p class="Paragraph">4</p>
  392.     </span></td><td class="Tabelle5B2" style="text-align:left;"><span class="Tabelle5B">
  393.      <p class="Paragraph">Tab1</p>
  394.     </span></td><td class="Tabelle5C2" style="text-align:left;"><span class="Tabelle5C">
  395.      <p class="Paragraph">Table number in the upper-left corner of the cell area; numbering starts at 0.</p>
  396.     </span></td></tr><tr class=""><td class="Tabelle5A2" style="text-align:left;"><span class="Tabelle5A">
  397.      <p class="Paragraph">6</p>
  398.     </span></td><td class="Tabelle5B2" style="text-align:left;"><span class="Tabelle5B">
  399.      <p class="Paragraph">Col2</p>
  400.     </span></td><td class="Tabelle5C2" style="text-align:left;"><span class="Tabelle5C">
  401.      <p class="Paragraph">Column number in the lower-right corner of the cell area. Numbering starts at 0.</p>
  402.     </span></td></tr><tr class=""><td class="Tabelle5A2" style="text-align:left;"><span class="Tabelle5A">
  403.      <p class="Paragraph">8</p>
  404.     </span></td><td class="Tabelle5B2" style="text-align:left;"><span class="Tabelle5B">
  405.      <p class="Paragraph">Row2</p>
  406.     </span></td><td class="Tabelle5C2" style="text-align:left;"><span class="Tabelle5C">
  407.      <p class="Paragraph">Row number in the lower-right corner of the cell area; numbering starts at 0.</p>
  408.     </span></td></tr><tr class=""><td class="Tabelle5A2" style="text-align:left;"><span class="Tabelle5A">
  409.      <p class="Paragraph">10</p>
  410.     </span></td><td class="Tabelle5B2" style="text-align:left;"><span class="Tabelle5B">
  411.      <p class="Paragraph">Tab2</p>
  412.     </span></td><td class="Tabelle5C2" style="text-align:left;"><span class="Tabelle5C">
  413.      <p class="Paragraph">Table number in the lower-right corner of the cell area; numbering starts at 0.</p>
  414.     </span></td></tr><tr class=""><td class="Tabelle5A2" style="text-align:left;"><span class="Tabelle5A">
  415.      <p class="Paragraph">12</p>
  416.     </span></td><td class="Tabelle5B2" style="text-align:left;"><span class="Tabelle5B">
  417.      <p class="Paragraph">Count</p>
  418.     </span></td><td class="Tabelle5C2" style="text-align:left;"><span class="Tabelle5C">
  419.      <p class="Paragraph">Number of the following elements. Empty cells are not counted or passed.</p>
  420.     </span></td></tr><tr class=""><td class="Tabelle5A2" style="text-align:left;"><span class="Tabelle5A">
  421.      <p class="Paragraph">14</p>
  422.     </span></td><td class="Tabelle5B2" style="text-align:left;"><span class="Tabelle5B">
  423.      <p class="Paragraph">Col</p>
  424.     </span></td><td class="Tabelle5C2" style="text-align:left;"><span class="Tabelle5C">
  425.      <p class="Paragraph">Column number of the element. Numbering starts at 0.</p>
  426.     </span></td></tr><tr class=""><td class="Tabelle5A2" style="text-align:left;"><span class="Tabelle5A">
  427.      <p class="Paragraph">16</p>
  428.     </span></td><td class="Tabelle5B2" style="text-align:left;"><span class="Tabelle5B">
  429.      <p class="Paragraph">Row</p>
  430.     </span></td><td class="Tabelle5C2" style="text-align:left;"><span class="Tabelle5C">
  431.      <p class="Paragraph">Row number of the element; numbering starts at 0.</p>
  432.     </span></td></tr><tr class=""><td class="Tabelle5A2" style="text-align:left;"><span class="Tabelle5A">
  433.      <p class="Paragraph">18</p>
  434.     </span></td><td class="Tabelle5B2" style="text-align:left;"><span class="Tabelle5B">
  435.      <p class="Paragraph">Tab</p>
  436.     </span></td><td class="Tabelle5C2" style="text-align:left;"><span class="Tabelle5C">
  437.      <p class="Paragraph">Table number of the element; numbering starts at 0.</p>
  438.     </span></td></tr><tr class=""><td class="Tabelle5A2" style="text-align:left;"><span class="Tabelle5A">
  439.      <p class="Paragraph">20</p>
  440.     </span></td><td class="Tabelle5B2" style="text-align:left;"><span class="Tabelle5B">
  441.      <p class="Paragraph">Error</p>
  442.     </span></td><td class="Tabelle5C2" style="text-align:left;"><span class="Tabelle5C">
  443.      <p class="Paragraph">Error number, where the value 0 is defined as "no error." If the element comes from a formula cell the error value is determined by the formula.</p>
  444.     </span></td></tr><tr class=""><td class="Tabelle5A2" style="text-align:left;"><span class="Tabelle5A">
  445.      <p class="Paragraph">22</p>
  446.     </span></td><td class="Tabelle5B2" style="text-align:left;"><span class="Tabelle5B">
  447.      <p class="Paragraph">Type</p>
  448.     </span></td><td class="Tabelle5C2" style="text-align:left;"><span class="Tabelle5C">
  449.      <p class="Paragraph">Type of cell content, 0 == Double, 1 == String</p>
  450.     </span></td></tr><tr class=""><td class="Tabelle5A2" style="text-align:left;"><span class="Tabelle5A">
  451.      <p class="Paragraph">24</p>
  452.     </span></td><td class="Tabelle5B2" style="text-align:left;"><span class="Tabelle5B">
  453.      <p class="Paragraph">Value or Len</p>
  454.     </span></td><td class="Tabelle5C2" style="text-align:left;"><span class="Tabelle5C">
  455.      <p class="Paragraph">If type == 0: 8 byte IEEE variable of type double/floating point</p>
  456.      <p class="Paragraph">If type == 1: Length of the following string, including closing zero byte. If the length including closing zero byte equals an odd value a second zero byte is added to the string so that an even value is achieved. Therefore, Len is calculated using ((StrLen+2)&~1).</p>
  457.     </span></td></tr><tr class=""><td class="Tabelle5B2" style="text-align:left;"><span class="Tabelle5A">
  458.      <p class="Paragraph">26 if type==1</p>
  459.     </span></td><td class="Tabelle5B2" style="text-align:left;"><span class="Tabelle5B">
  460.      <p class="Paragraph">String</p>
  461.     </span></td><td class="Tabelle5C2" style="text-align:left;"><span class="Tabelle5C">
  462.      <p class="Paragraph">If type == 1: String with closing zero byte</p>
  463.     </span></td></tr><tr class=""><td class="Tabelle5B2" style="text-align:left;"><span class="Tabelle5A">
  464.      <p class="Paragraph">32 or 26+Len</p>
  465.     </span></td><td class="Tabelle5B2" style="text-align:left;"><span class="Tabelle5B">
  466.      <p class="Paragraph">...</p>
  467.     </span></td><td class="Tabelle5C2" style="text-align:left;"><span class="Tabelle5C">
  468.      <p class="Paragraph">Next element</p>
  469.     </span></td></tr></table>
  470.   <p class="Paragraph"/>
  471.  </body></html>